Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(#134): update civitheme_library to @civictheme/uikit #135

Merged
merged 4 commits into from
Jan 12, 2024

Conversation

Decipher
Copy link
Member

@Decipher Decipher commented Jan 12, 2024

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

  • update civitheme_library to @civictheme/uikit

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

Screenshots/Media:

Summary by CodeRabbit

  • Refactor

    • Updated import paths to utilize the new @civictheme/uikit package across various components.
  • Style

    • Adjusted the class attribute in GroupFilter.vue for improved layout and removed size attribute from CTSelect for consistent styling.
  • Chores

    • Added a new plugin and updated CSS import paths in nuxt/index.js for alignment with the updated package structure.

Copy link

coderabbitai bot commented Jan 12, 2024

Walkthrough

The project has undergone a reorganization, shifting various component imports from the civictheme package to the new @civictheme/uikit package. This update affects the way components are loaded, as well as some styling and layout aspects. A plugin addition in the Nuxt configuration suggests an enhancement in the project's structure or functionality.

Changes

File(s) Summary of Changes
src/components/BackToTop.vue
src/components/Collapsible.vue
src/components/Flyout.vue
src/components/Icon.vue
src/components/MenuItem.vue
src/components/Popover.vue
src/components/Menu.stories.js
src/components/MobileNavigation.stories.js
src/components/Navigation.stories.js
test/components/Menu.cy.js
test/components/Navigation.cy.js
Updated import paths from civictheme to @civictheme/uikit.
src/components/GroupFilter.vue Modified class attribute and removed size attribute from CTSelect.
src/nuxt/index.js
src/nuxt/plugin.client.js
Updated CSS and JS import paths to @civictheme/uikit/dist and added a plugin.
cypress/support/component.js Updated paths for required CSS assets to use the @civictheme/uikit package.

🐇✨
To @civictheme/uikit we hop and leap,
With updated paths our code does creep.
Modules align in tidy rows,
A rabbit's touch—how well it shows!
🌟🌿

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 4662ba5 and 4a2b9ee.
Files ignored due to filter (2)
  • package.json
  • yarn.lock
Files selected for processing (12)
  • src/components/BackToTop.vue (1 hunks)
  • src/components/Collapsible.vue (2 hunks)
  • src/components/Flyout.vue (1 hunks)
  • src/components/GroupFilter.vue (2 hunks)
  • src/components/Icon.vue (1 hunks)
  • src/components/Menu.stories.js (1 hunks)
  • src/components/MenuItem.vue (2 hunks)
  • src/components/MobileNavigation.stories.js (1 hunks)
  • src/components/Navigation.stories.js (1 hunks)
  • src/components/Popover.vue (2 hunks)
  • src/nuxt/index.js (1 hunks)
  • src/nuxt/plugin.client.js (1 hunks)
Files skipped from review due to trivial changes (1)
  • src/nuxt/plugin.client.js
Additional comments: 14
src/components/Icon.vue (1)
  • 31-31: The import path for SVG icons has been updated to @civictheme/uikit. Ensure that the SVG icons are correctly accessible at this new path and that all icons used in the application have corresponding SVG files in the updated package.
src/components/BackToTop.vue (1)
  • 27-27: The require path for the scrollspy component has been updated to @civictheme/uikit. Verify that the scrollspy component is functioning as expected with the new path and that the component is properly initialized on the client side.
src/nuxt/index.js (1)
  • 6-7: The paths for CSS files have been updated to @civictheme/uikit. Confirm that the CSS files are correctly located at the new paths and that they are being included without issues in the Nuxt.js configuration.
src/components/Menu.stories.js (1)
  • 2-2: The import path for the collapsible component has been updated to @civictheme/uikit. Verify that the collapsible component is correctly imported and functioning as expected in the story files.
src/components/Navigation.stories.js (1)
  • 2-2: The import path for the collapsible component has been updated to @civictheme/uikit. Verify that the collapsible component is correctly imported and functioning as expected in the story files.
src/components/MobileNavigation.stories.js (1)
  • 2-2: The import path for the flyout component has been updated to @civictheme/uikit. Verify that the flyout component is correctly imported and functioning as expected in the story files.
src/components/Popover.vue (2)
  • 49-50: The import paths for the collapsible component have been updated in the mounted method. Verify that the collapsible component is correctly imported and initialized when the Popover component is mounted.

  • 60-60: The import path for the collapsible component has been updated in the beforeDestroy method. Ensure that the cache deletion is functioning correctly and that there are no memory leaks or errors when the Popover component is destroyed.

src/components/Collapsible.vue (2)
  • 35-38: The paths for requiring the collapsible module have been updated in the mounted method. Verify that the collapsible module is correctly imported and initialized when the Collapsible component is mounted.

  • 50-50: The path for requiring the collapsible module has been updated in the beforeDestroy method. Ensure that the cache deletion is functioning correctly and that there are no memory leaks or errors when the Collapsible component is destroyed.

src/components/Flyout.vue (1)
  • 33-33: The import statement for the CivicThemeFlyout component has been modified to reference a different file path. Verify that the CivicThemeFlyout component is correctly imported and functioning as expected in the Flyout component.
src/components/GroupFilter.vue (1)
  • 9-9: The class attribute of a div element has been modified to include ct-group-filter__row. Confirm that this change aligns with the intended styling and that the corresponding CSS rules are present in the stylesheet.
src/components/MenuItem.vue (2)
  • 116-117: The paths for requiring the collapsible module have been updated in the created method. Verify that the collapsible module is correctly imported and initialized when the MenuItem component is created.

  • 121-122: The paths for requiring the flyout module have been updated in the created method. Verify that the flyout module is correctly imported and initialized when the MenuItem component is created.

src/components/MenuItem.vue Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 4a2b9ee and e94d548.
Files ignored due to filter (2)
  • package.json
  • yarn.lock
Files selected for processing (1)
  • cypress/support/component.js (1 hunks)
Additional comments: 2
cypress/support/component.js (2)
  • 31-32: The update to the CSS asset paths using @civictheme/uikit package is noted. Ensure that the new paths are correct and that the assets are properly loaded during Cypress tests. If the old paths are no longer valid, this change is necessary for the tests to reflect the updated UI.

  • 28-35: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1-30]

No further changes detected in the file. It is important to verify that the updated CSS assets do not introduce any regressions in the Cypress tests, especially in the accessibility and visual regression tests. Running the full test suite should confirm that the updated assets integrate seamlessly.

Also applies to: 33-50

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 4a2b9ee and 184158e.
Files ignored due to filter (2)
  • package.json
  • yarn.lock
Files selected for processing (3)
  • cypress/support/component.js (1 hunks)
  • test/components/Menu.cy.js (1 hunks)
  • test/components/Navigation.cy.js (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • cypress/support/component.js
Additional comments: 2
test/components/Menu.cy.js (1)
  • 7-7: The import path for the collapsible component has been updated to use the new @civictheme/uikit package. Ensure that this new path correctly points to the collapsible component and that the component functions as expected with this new import.
test/components/Navigation.cy.js (1)
  • 10-10: The import path for the collapsible component has been updated to use the new @civictheme/uikit package. Ensure that this new path correctly points to the collapsible component and that the component functions as expected with this new import.
Verification successful

The verification process has found references to the collapsible component within the @civictheme/uikit package, specifically in the Collapsible.vue file. This supports the updated import path in the Navigation.cy.js file, indicating that the path is correctly pointing to the collapsible component. The component should function as expected with this new import, assuming that the rest of the integration is consistent.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the collapsible component exists at the new path.
fd 'collapsible.js' --exec rg 'collapsible' {} +

Length of output: 48



Script:

#!/bin/bash
# Attempt to find the collapsible component within the new package structure.
fd 'collapsible' --exec rg 'collapsible' {} +

Length of output: 1069

@Decipher Decipher merged commit b517349 into develop Jan 12, 2024
3 checks passed
@Decipher Decipher deleted the feature/134-uikit branch January 12, 2024 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant